package com.ruoyi.lvlian.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.utils.StringUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import com.ruoyi.common.core.web.domain.BaseEntity;


@ApiModel(value = "跟单信息对象", description = "跟单信息对象")
@Data
@ToString
public class OrderInfo {
    private static final long serialVersionUID = 1L;

    /** 完成未完成已取消 */
//    @ApiModelProperty(value = "统一状态 (业务员司机公用 参考https://modao.cc/proto/3E1btj33skpxh4S0o7rfw/sharing?view_mode=read_only) 业务员 1 创建中·待请求 , 2待司机授权 ,3司机已授权·待发起,4运输中,5司机已交货·待查收,6已完成 ,10跟车方已取消 ,11司司机已取消")



    public String getBusinessUserOutGuobangImg() {
        if (StringUtils.isNotEmpty(businessUserOutGuobangImg) &&  !businessUserOutGuobangImg.contains( "http") ) {
            return "https://data.lvlianhengsheng.com/dev-api/file/fileAttachmentInfo/viewImage?key=" + businessUserOutGuobangImg;
        }
        return businessUserOutGuobangImg;
    }




    public String getDriverGuobangImg() {
        if (StringUtils.isNotEmpty(driverGuobangImg) &&  !driverGuobangImg.contains( "http") ) {
            return "https://data.lvlianhengsheng.com/dev-api/file/fileAttachmentInfo/viewImage?key=" + driverGuobangImg;
        }
        return driverGuobangImg;
    }



    /** id */
    private String id;

    /** 订单号 */
    @ApiModelProperty(value = "跟单号")
    private String orderNum;

    /** 发货人姓名 */
    @ApiModelProperty(value = "发货人姓名")
    private String sellerName;

    /** 发货人电话 */
    @ApiModelProperty(value = "发货人电话")
    private String sellerPhone;

    /** 发货公司 */
    @ApiModelProperty(value = "发货公司")
    private String sellerCompanyName;

    /** 发货地址 */
    @ApiModelProperty(value = "发货地址")
    private String sellerAddr;

    /** 收货人姓名 */
    @ApiModelProperty(value = "收货人姓名")
    private String buyerName;

    /** 收货人电话 */
    @ApiModelProperty(value = "收货人电话")
    private String buyerPhone;

    /** 收货地址 */
    @ApiModelProperty(value = "收货地址")
    private String buyerAddr;

    /** 收货方公司 */
    @ApiModelProperty(value = "收货方公司")
    private String buyerCompanyName;

    /** 跟车方姓名 */
    @ApiModelProperty(value = "跟车方姓名")
    private String businessUserName;

    /** 业务员 1 创建中·待请求 , 2待司机授权 ,3司机已授权·待发起,4运输中,5司机已交货·待查收,6已完成 ,10跟车方已取消 ,11司司机已取消 */
    @ApiModelProperty(value = "业务员 1 创建中·待请求 , 2待司机授权 ,3司机已授权·待发起,4运输中,5司机已交货·待查收,6已完成 ,10跟车方已取消 ,11司司机已取消")
    private Integer businessUserStatus;

    /** 跟车方电话 */
    @ApiModelProperty(value = "跟车方电话")
    private String businessUserPhone;

    /** 跟车方公司 */
    @ApiModelProperty(value = "跟车方公司")
    private String businessUserCompanyName;

    /** 发货单号 */
    @ApiModelProperty(value = "发货单号")
    private String businessUserFahuoNum;

    /** 业务人员开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "业务人员开始时间 ")
    private String businessUserStartTime;

    /** 跟车方地址 */
    @ApiModelProperty(value = "跟车方地址")
    private String businessUserAddr;

    /** 业务人员完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "业务人员完成时间 ")
    private String businessUserEndTime;

    /** 司机身份证号码 */
    @ApiModelProperty(value = "司机身份证号码")
    private String driverIdCard;

    /** 司机姓名 */
    @ApiModelProperty(value = "司机姓名")
    private String driverName;

    /** 司机手机 */
    @ApiModelProperty(value = "司机手机")
    private String driverPhone;

    /** 司机起始时间 */
    @ApiModelProperty(value = "司机起始时间")
    private String driverStartTime;

    /** 司机完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "司机完成时间 yyyy-MM-dd")
    private String driverEndTime;


    /** 实时所在点 */
    @ApiModelProperty(value = "实时所在点")
    private String driverRealtimeLocation;

    /** 车牌号 */
    @ApiModelProperty(value = "车牌号")
    private String plateNo;

    /** 录入人 */
    @ApiModelProperty(value = "录入人")
    private String createUser;

    /** 录入日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "录入日期yyyy-MM-dd")
    private String createDate;

    /**  */
    @ApiModelProperty(value = "")
    private String orgCode;

    /** 否是暂存数据，1默认是true */
    @ApiModelProperty(value = "否是暂存数据，1默认是true")
    private Integer isTemporary;

    /** 跟单类型 */
    @ApiModelProperty(value = "跟单类型")
    private String category;

    /** 确认函手机号 */
    @ApiModelProperty(value = "确认函手机号")
    private String confirmationLetterPhone;




    /** 司机入库过磅单照片 */
    @ApiModelProperty(value = "司机入库过磅单照片9")
    private String driverGuobangImg;



    /** 出库过磅单照片 */
    @ApiModelProperty(value = "出库过磅单照片8")
    private String businessUserOutGuobangImg;


    /** 装车称重照片 */
    @ApiModelProperty(value = "装车称重照片1")
    private String loadWeightImg;
    /** 装车照片 */
    @ApiModelProperty(value = "装车照片2")
    private String loadImg;

    @ApiModelProperty(value = "出库毛重磅头照片3")
    private String outGrossWeightImg;
    /** 出库过磅单照片 */
    @ApiModelProperty(value = "出库过磅单照片4")
    private String outWeighNumImg;
    /** 入库称重照片 */
    @ApiModelProperty(value = "d入库称重照片5")
    private String inWeightImg;

    /** 卸货照片 */
    @ApiModelProperty(value = "卸货照片6")
    private String unloadImg;

    @ApiModelProperty(value = "入库毛重磅头照片7")
    private String inGrossWeightImg;
    /** 入库过磅单照片 */
    @ApiModelProperty(value = "入库过磅单照片8")
    private String inWeighNumImg;







    @ApiModelProperty(value = "使用人的当前位置")
    private String standardAddress;


    @ApiModelProperty(value = "manual / auto")
    private String captureMode;


    @ApiModelProperty(value = "关联磅台id")
    private String weighbridgeId;

    @ApiModelProperty(value = "关联磅台名称")
    private String weighbridgeName;

    public String getLoadWeightImg() {
        if("https://data.lvlianhengsheng.com/dev-api".equalsIgnoreCase( loadWeightImg)  || org.apache.commons.lang3.StringUtils.countMatches(  loadWeightImg ,"http" )>1    ){
            return null;
        }
        if (com.ruoyi.common.core.utils.StringUtils.isNotEmpty(loadWeightImg) &&  !loadWeightImg.contains( "http")) {
            return "https://data.lvlianhengsheng.com/dev-api/file/fileAttachmentInfo/viewImage?key=" + loadWeightImg;
        }
        return loadWeightImg;
    }

    public String getInWeighNumImg() {
        if("https://data.lvlianhengsheng.com/dev-api".equalsIgnoreCase( inWeighNumImg)  || org.apache.commons.lang3.StringUtils.countMatches(  inWeighNumImg ,"http" )>1    ){
            return null;
        }
        if (com.ruoyi.common.core.utils.StringUtils.isNotEmpty(inWeighNumImg) &&  !inWeighNumImg.contains( "http")) {
            return "https://data.lvlianhengsheng.com/dev-api/file/fileAttachmentInfo/viewImage?key=" + inWeighNumImg;
        }
        return inWeighNumImg;
    }

    public String getInWeightImg() {
        if("https://data.lvlianhengsheng.com/dev-api".equalsIgnoreCase( inWeightImg)  || org.apache.commons.lang3.StringUtils.countMatches(  inWeightImg ,"http" )>1    ){
            return null;
        }
        if (com.ruoyi.common.core.utils.StringUtils.isNotEmpty(inWeightImg) &&  !inWeightImg.contains( "http")) {
            return "https://data.lvlianhengsheng.com/dev-api/file/fileAttachmentInfo/viewImage?key=" + inWeightImg;
        }
        return inWeightImg;
    }

    public String getUnloadImg() {
        if("https://data.lvlianhengsheng.com/dev-api".equalsIgnoreCase( unloadImg)  || org.apache.commons.lang3.StringUtils.countMatches(  unloadImg ,"http" )>1    ){
            return null;
        }
        if (com.ruoyi.common.core.utils.StringUtils.isNotEmpty(unloadImg) &&  !unloadImg.contains( "http")) {
            return "https://data.lvlianhengsheng.com/dev-api/file/fileAttachmentInfo/viewImage?key=" + unloadImg;
        }
        return unloadImg;
    }

    public String getOutWeighNumImg() {
        if("https://data.lvlianhengsheng.com/dev-api".equalsIgnoreCase( outWeighNumImg)  || org.apache.commons.lang3.StringUtils.countMatches(  outWeighNumImg ,"http" )>1    ){
            return null;
        }
        if (com.ruoyi.common.core.utils.StringUtils.isNotEmpty(outWeighNumImg) &&  !outWeighNumImg.contains( "http")) {
            return "https://data.lvlianhengsheng.com/dev-api/file/fileAttachmentInfo/viewImage?key=" + outWeighNumImg;
        }
        return outWeighNumImg;
    }

    public String getLoadImg() {
        if("https://data.lvlianhengsheng.com/dev-api".equalsIgnoreCase( loadImg)  || org.apache.commons.lang3.StringUtils.countMatches(  loadImg ,"http" )>1    ){
            return null;
        }
        if (com.ruoyi.common.core.utils.StringUtils.isNotEmpty(loadImg) &&  !loadImg.contains( "http")) {
            return "https://data.lvlianhengsheng.com/dev-api/file/fileAttachmentInfo/viewImage?key=" + loadImg;
        }
        return loadImg;
    }


    public String getInGrossWeightImg() {
        if("https://data.lvlianhengsheng.com/dev-api".equalsIgnoreCase( inGrossWeightImg)  || org.apache.commons.lang3.StringUtils.countMatches(  inGrossWeightImg ,"http" )>1    ){
            return null;
        }
        if (com.ruoyi.common.core.utils.StringUtils.isNotEmpty(inGrossWeightImg) &&  !inGrossWeightImg.contains( "http")) {
            return "https://data.lvlianhengsheng.com/dev-api/file/fileAttachmentInfo/viewImage?key=" + inGrossWeightImg;
        }

        return inGrossWeightImg;
    }

    public String getOutGrossWeightImg() {

        if("https://data.lvlianhengsheng.com/dev-api".equalsIgnoreCase( outGrossWeightImg)  || org.apache.commons.lang3.StringUtils.countMatches(  outGrossWeightImg ,"http" )>1    ){
            return null;
        }
        if (com.ruoyi.common.core.utils.StringUtils.isNotEmpty(outGrossWeightImg) &&  !outGrossWeightImg.contains( "http")) {
            return "https://data.lvlianhengsheng.com/dev-api/file/fileAttachmentInfo/viewImage?key=" + outGrossWeightImg;
        }

        return outGrossWeightImg;
    }
}
